package iammry.com.fragment;

import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import iammry.com.R;

public class Left_Fragment extends Fragment {
    View v;
    ImageView ivBrushAnimal;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_left_menu, container, false);

        initView();
        return v;
    }

    public void initView() {
        ivBrushAnimal = (ImageView) v.findViewById(R.id.iv_brushAnimal);
        ivBrushAnimal.setBackgroundResource(R.drawable.synchrodata_animal);
        startAnima();
    }

    private void startAnima() {

        AnimationDrawable anim = (AnimationDrawable) ivBrushAnimal
                .getBackground();
        anim.start();
    }
}
